package com.music.common.core.constant;

/**
 * 通用常量信息
 *
 * @author ruoyi
 */
public class Constants {
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * www主域
     */
    public static final String WWW = "www.";

    /**
     * RMI 远程方法调用
     */
    public static final String LOOKUP_RMI = "rmi:";

    /**
     * LDAP 远程方法调用
     */
    public static final String LOOKUP_LDAP = "ldap:";

    /**
     * LDAPS 远程方法调用
     */
    public static final String LOOKUP_LDAPS = "ldaps:";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 200;

    /**
     * 失败标记
     */
    public static final Integer FAIL = 500;

    /**
     * 登录成功状态
     */
    public static final String LOGIN_SUCCESS_STATUS = "0";

    /**
     * 登录失败状态
     */
    public static final String LOGIN_FAIL_STATUS = "1";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 验证码有效期（分钟）
     */
    public static final long CAPTCHA_EXPIRATION = 2;

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * 自动识别json对象白名单配置（仅允许解析的包名，范围越小越安全）
     */
    public static final String[] JSON_WHITELIST_STR = {"org.springframework", "com.music"};

    /**
     * 定时任务白名单配置（仅允许访问的包名，如其他需要可以自行添加）
     */
    public static final String[] JOB_WHITELIST_STR = {"com.music.job.task"};

    /**
     * 定时任务违规的字符
     */
    public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
            "org.springframework", "org.apache", "com.music.common.core.utils.file"};


    /**登录拦截*/
    public static final String LOGIN_TOKEN_AUTH = "Authorization";
    public static final String JWT_PREFIX = "Bearer ";
    public static final String LOGIN_TOKEN_WEB = "Web-User-Token";

    /**订单状态*/
    public static final Integer UN_PAY_ORDER_STATUS = 1;
    public static final Integer PAY_ORDER_STATUS = 2;
    public static final Integer CANCEL_ORDER_STATUS = 3;
    public static final Integer AVAILABLE_USER_STATUS = 1;
    public static final Integer UN_AVAILABLE_USER_STATUS = 2;
    public static final String WHITE_USER_ACCOUNT_KEY = "whiteUserAccount";
    public static final String USER_GETINFO_CNT = "USER_GETINFO_CNT:";
    public static final String LOGIN_USER_TOKEN = "LOGIN_USER_TOKEN:";
    public static final String TOKEN_CAN_NOT_BE_EMPTY = "令牌不能为空";
    public static final String TOKEN_HAS_EXPIRED_OR_VERIFICATION_IS_INCORRECT = "令牌已过期或验证不正确！";
    public static final String LOGIN_STATUS_HAS_EXPIRED = "登录状态已过期";
    public static final String TOKEN_VERIFICATION_IS_FAILED = "令牌验证失败";

    public static final String MESSAGE_USER_QUEUE = "MESSAGE_USER_QUEUE";
    public static final String MESSAGE_USER_EXCHANGE = "MESSAGE_USER_EXCHANGE";
    public static final String MESSAGE_USER_ROUTING = "MESSAGE_USER_ROUTING";
    public static final String MESSAGE_USER_CODE = "MESSAGE_USER_CODE:";
    public static final String MESSAGE_USER_CNT_REGISTER = "MESSAGE_USER_CNT_REGISTER:";
    public static final String CAROUSEL_LIST_KEY = "CAROUSEL_LIST_KEY";
    public static final String MUSIC_TYPE_LIST_KEY = "MUSIC_TYPE_LIST_KEY";
    public static final Integer ADD_MUSIC_COLLECT_COUNT = 1;
    public static final Integer DEL_MUSIC_COLLECT_COUNT = -1;
}
